package redick;

import java.util.*;
import java.util.Iterator;

public class Environment {
	/*
	 * map from a variable name to an Object - which may be a datum or a
	 * procedure
	 */
	public Map<String,Object> bindings = new HashMap<String, Object>();
	public Environment parent;

	public void put(String var, Object value) {
		bindings.put(var, value);
	}
	public Object get(String var) {

		Object retval = bindings.get(var);
		/* Cannot comment this section out */
		if (retval == null) {
			return (Object)null;
		} else {
			return retval;
		}
		/* End required section */
	}

	public String toString() { return bindings.toString(); }

}
